'use strict';

angular.module('snPaas_om')
	.controller('MonitorMysqlCtrl',['$scope','baseUrl','monitorStore','clusterStore',function($scope,baseUrl,monitorStore,clusterStore){
		var vm = $scope;
		vm.baseUrl = baseUrl.static;
		vm.isInit = false;
		clusterStore.query().then(function(data){
			if(data.length !=0){
				console.log(data);
				vm.isInit = true;
				vm.clusterName = data[0].deploymentName;
				vm.clusterId = data[0].deployId;

				monitorStore.clusterMonit(vm.clusterId).then(function(data){
					vm.monitList = data;
				});
			}
		});
		
		
	
	}]);